var t = require("../export.js");

getApp();

Page({
    data: {
        merchantinfo: []
    },
    onLoad: function(t) {
        this.getMerchantInfo(t);
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    getMerchantInfo: function(n) {
        var o = this;
        t.requestUtil.post(t._DuoguanData.duoguan_host_api_url + "/index.php/addon/DuoguanCar/Api/getMerchantInfo.html", n, function(t) {
            o.setData({
                merchantinfo: t
            });
        }), console.log(this.data);
    },
    aboutUs: function(t) {
        console.log(t);
        var n = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/pages/car/about-us/about-us?id=" + n
        });
    },
    goAddress: function(t) {
        console.log(t);
        var n = t.currentTarget.dataset.lat, o = t.currentTarget.dataset.lng;
        wx.openLocation({
            latitude: parseFloat(n),
            longitude: parseFloat(o),
            scale: 28
        });
    },
    callPhone: function(t) {
        var n = t.currentTarget.dataset.mobile;
        wx.makePhoneCall({
            phoneNumber: n
        });
    }
});